package com.gengealogy.net.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gengealogy.net.dao.MemberDao;
import com.gengealogy.net.dao.UserDao;
import com.gengealogy.net.po.Member;
import com.gengealogy.net.po.User;
import com.gengealogy.net.service.MemberService;
import com.gengealogy.net.service.UserService;

@Service("memberService")
@Transactional
public class MemberServiceImpl implements MemberService{

		@Autowired
		private MemberDao memberDao;
		public MemberDao getMemberDao() {
			return memberDao;
		}

		public void setMemberDao(MemberDao memberDao) {
			this.memberDao = memberDao;
		}

		@Override
		public List<Member> findMember(int member_clan_id) {
			List<Member> member = this.memberDao.findMember(member_clan_id);
			return member;
		}
		
		@Override
		public int addMember(Member member){
			return memberDao.addMember(member);
		}

		@Override
		public Member getMemberById(int member_id) {
			// TODO Auto-generated method stub
			return memberDao.getMemberById(member_id);
		}

		@Override
		public int updateMember(Member member){
			// TODO Auto-generated method stub
			return memberDao.updateMember(member);
		}

		@Override
		public int deleteMember(int member_id){
			// TODO Auto-generated method stub
			return memberDao.deleteMember(member_id);
		}

		@Override
		public Member findUserMember(int member_user_id) {
			// TODO Auto-generated method stub
			return memberDao.findUserMember(member_user_id);
		}
	
	
}
